package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckItem;
import com.itheima.pojo.Permission;

import java.util.List;
import java.util.Set;

public interface PermissionDao {

    //根据角色id查询角色拥有的权限
    public Set<Permission> findPermissionByRoleId(int roleId);

    //查询所有权限
    List<Permission> findAll();

    //根据查询条件查询权限
    Page<CheckItem> selectByCondition(String queryString);

    void add(Permission permission);

    Permission findById(Integer id);

    void edit(Permission permission);

    long findCountByPermissionId(Integer permissionId);

    void deleteById(Integer id);
}
